﻿<navigation:Page x:Class="CoverFlowClient.Pages.ImageCoverFlow" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:c="clr-namespace:DC.ControlLibrary;assembly=DC.ControlLibrary"
           xmlns:app="clr-namespace:CoverFlowClient"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="ImageCoverFlow Page">    
    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <app:UrlConverter x:Key="UrlConverter"/>
        </Grid.Resources >
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="500" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid Grid.Row="1" Background="Black">
            <Grid>
                <Grid.OpacityMask>
                    <LinearGradientBrush EndPoint="0,.5" StartPoint="1,.5">
                        <GradientStop Color="#00000000" Offset="1"/>
                        <GradientStop Color="#FF000000" Offset="0.8"/>
                        <GradientStop Color="#FE000000" Offset="0.2"/>
                        <GradientStop Color="#00000000" Offset="0"/>
                    </LinearGradientBrush>
                </Grid.OpacityMask>
                <c:CoverFlowControl x:Name="flowControl" CacheMode="BitmapCache" >
                    <c:CoverFlowControl.ItemTemplate>
                        <DataTemplate>
                            <Border CornerRadius="10" BorderBrush="#99444444" BorderThickness="2" Background="{Binding ImageUrl, Converter={StaticResource UrlConverter}}" >
                                <Image Source="{Binding ImageUrl}" Opacity="0"  >
                                </Image>
                            </Border>
                        </DataTemplate>
                    </c:CoverFlowControl.ItemTemplate>
                </c:CoverFlowControl>
            </Grid>

        </Grid>
    </Grid>
</navigation:Page>
